/**
 * Created by xn on 2015/10/27.
 */


window.onload = function(){
    cc.game.onStart = function(){
        var w = document.documentElement.clientWidth
        var h = document.documentElement.clientHeight
        cc.view.setDesignResolutionSize(w, h, cc.ResolutionPolicy.SHOW_ALL);
        cc.LoaderScene.preload(g_resources, function () {
            var mainScene = new MainScene()
            if ( s_gameVersions ) {
                var gameVersionsLabel = new cc.LabelTTF( "Versions: " + s_gameVersions, "Arial", 22)
                gameVersionsLabel.setColor(cc.color(0, 0, 0));
                gameVersionsLabel.attr({ x: cc.winSize.width/2, y: 50})

                var layer = new cc.Layer()
                layer.addChild(gameVersionsLabel)
                mainScene.addChild(layer, 988888)
            }
            cc.director.runScene(mainScene);
        }, this);
    };
    cc.game.run("gameCanvas");
};



